//
//  MAPYBaseViewController.swift
//  Mars Proxy
//
//  Created by PowerfullClean on 2023/10/16.
//

import UIKit

class MAPYBaseViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white
        view.addSubview(mapy_bgView)
        
        guard let mapy_baseBgName = mapy_baseBgName() else { return  }
        mapy_bgView.image = UIImage(named:mapy_baseBgName)
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationController?.setNavigationBarHidden(true, animated: false)
    }
    func mapy_baseBgName() -> String? {
        return "mapy_scan_bg"
    }
    deinit {
        print("[MAPY]控制器释放==\(self)")
        NotificationCenter.default.removeObserver(self)
    }
    lazy var mapy_bgView: UIImageView = {
        let mapy_bgView = UIImageView(frame: view.bounds)
        mapy_bgView.contentMode = .scaleAspectFill
        return mapy_bgView
    }()
    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}
